package com.ugoodtech.mdcc.core.utils;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: Kotone
 * Date: 2017/9/12
 * Time: 19:10
 * To change this template use File | Settings | File Templates.
 */
public class PathUtil {

    public static String formatPathWith(String middlePath) throws IOException {
        String path=middlePath;
        //去尾
        String end=path.substring(path.length()-1);
        if(end.equals("/")){
            path= path.substring(0,path.length()-1);
        }
        //去头
        String start=path.substring(0,1);
        if(start.equals("/")){
            path= path.substring(1,path.length());
        }
        return path;
    }


}
